#ifndef CLIENT_SUB_H
#define CLIENT_SUB_H

#include <functional>
#include <string>
#include <thread>
#include <zmq.hpp>

/**
 * @class ClientSub
 * @brief Client消息订阅者
 *
 */
class ClientSub {
  std::jthread workThread;
  zmq::context_t context;
  zmq::socket_t subscriber;

public:
  ClientSub();
  void Boot(const std::string &addr);
  std::function<void(std::string msg)> funcMessage;
  std::function<void(std::string UUID)> funcCameraOffline;
  std::function<void(std::string UUID)> funcStartShot;
  std::function<void(std::string UUID)> funcStopShot;
};

#endif
